<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>flex</title>
  <style>
    .flex{
      display: -webkit-box;
      display: -moz-flex;
      display: -ms-flexbox;
      display: flex;
    }
    .flex-direction{
      -webkit-box-orient: vertical;
      -webkit-flex-direction: column;
      -ms-flex-direction: column;
      flex-direction: column;
    }
    .flex-flex{
      -webkit-box-flex: 1;
      -webkit-flex: 1;
      -ms-flex: 1;
      flex: 1;
    }
    .flex-align-center{
      -webkit-box-align: center;
      -webkit-align-items: center;
      -ms-flex-align: center;
      align-items: center;
    }
    .flex-justify-center{
      -webkit-box-pack: center;
      -webkit-justify-content: center;
      -ms-flex-pack: center;
      justify-content: center;
    }
    .flex-justify-space{
      -webkit-box-pack: justify;
      -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
      justify-content: space-between;
    }
  </style>
</head>
<body>
  <style>
    .parent  {
      display: -webkit-box;
      display: -moz-box;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: flex;
      background: #f5f5f5;
      border: 1px solid red;
      margin-left: -10px;
      overflow: hidden;
    }
    .parent-son{
      /* width: 200px; */
      height: 100px;
      margin-right: 10px;
      background: #eee;
      border: 1px solid #333;
      /* flex伸缩 */
      box-flex: 1;
      -webkit-box-flex: 1;
      -moz-box-flex: 1;
      flex: 1;
      -webkit-flex: 1;
      /* 横向布局 */
      -webkit-justify-content: center;
      justify-content: center;
      -moz-box-pack: center;
      -webkit-box-pack: center;
      box-pack: center;
      /* 出现顺序 */
      box-order: 1;
      -webkit-box-order: 1;
      -moz-box-order: 1;
      order: 1;
      -webkit-order: 1;
      /* 纵向布局 */
      -webkit-align-items: center;
      align-items: center;
      box-align: center;
      -moz-box-align: center;
      -webkit-box-align: center;
    }
    .parent-son2{
      height: 200px;
    }
  </style>
  <div class="parent">
    <div class="parent-son">1</div>
    <div class="parent-son parent-son2">2</div>
    <div class="parent-son">3</div>
    <div class="parent-son">4</div>
    <div class="parent-son">5</div>
  </div>
</body>
</html>